package br.uninove.preaula.graf;

import java.awt.EventQueue;
import java.awt.Toolkit;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import java.awt.Component;
import javax.swing.Box;
import java.awt.Dimension;
import javax.swing.JTable;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.table.DefaultTableModel;
import java.awt.Font;
import java.awt.Color;
import javax.swing.UIManager;
import javax.swing.JLabel;
import javax.swing.border.TitledBorder;
import javax.swing.JSpinner;
import javax.swing.SpinnerNumberModel;

public class TelaFinalDiscreta {

	private JFrame frmCalcstatc;
	private JTable table_1;
	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					TelaFinalDiscreta window = new TelaFinalDiscreta();
					window.frmCalcstatc.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public TelaFinalDiscreta() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		frmCalcstatc = new JFrame();
		frmCalcstatc.setIconImage(Toolkit.getDefaultToolkit().getImage("C:\\Users\\aruan\\Downloads\\imagens java\\seo1.png"));
		frmCalcstatc.setTitle("CalcStatc");
		frmCalcstatc.setBounds(100, 100, 900, 600);
		//frmCalcstatc.setExtendedState(JFrame.MAXIMIZED_BOTH); 
		frmCalcstatc.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frmCalcstatc.getContentPane().setLayout(null);
		
		Component horizontalStrut_1 = Box.createHorizontalStrut(20);
		horizontalStrut_1.setBounds(1230, 112, 122, 58);
		frmCalcstatc.getContentPane().add(horizontalStrut_1);
		
		Component verticalStrut_1 = Box.createVerticalStrut(20);
		verticalStrut_1.setBounds(1156, 11, 64, 100);
		frmCalcstatc.getContentPane().add(verticalStrut_1);
		
		JPanel panel = new JPanel();
		panel.setBounds(10, 11, 960, 510);
		frmCalcstatc.getContentPane().add(panel);
		panel.setLayout(null);
		
		JPanel panel_1 = new JPanel();
		panel_1.setBounds(0, 0, 955, 499);
		panel.add(panel_1);
		panel_1.setLayout(null);
		
		JScrollPane scrollPane = new JScrollPane();
		scrollPane.setBounds(10, 11, 542, 293);
		panel_1.add(scrollPane);
		
		table_1 = new JTable();
		table_1.setEnabled(false);
		table_1.setBackground(UIManager.getColor("Button.background"));
		table_1.setFont(new Font("Arial", Font.PLAIN, 14));
		table_1.setModel(new DefaultTableModel(
			new Object[][] {
				{new Integer(25), null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null, null, null},
			},
			new String[] {
				"Xi", "Fi", "Fa", "Xi*Fi", "Fr%", "Fra%", "| Xi - x |", "| Xi - x | * Fi", "( Xi - x )\u00B2", "( Xi - x )\u00B2 * Fi"
			}
		) {
			boolean[] columnEditables = new boolean[] {
				false, false, false, false, false, false, false, false, false, false
			};
			public boolean isCellEditable(int row, int column) {
				return columnEditables[column];
			}
		});
		table_1.getColumnModel().getColumn(0).setResizable(false);
		table_1.getColumnModel().getColumn(0).setPreferredWidth(30);
		table_1.getColumnModel().getColumn(0).setMinWidth(20);
		table_1.getColumnModel().getColumn(0).setMaxWidth(30);
		table_1.getColumnModel().getColumn(1).setResizable(false);
		table_1.getColumnModel().getColumn(1).setPreferredWidth(30);
		table_1.getColumnModel().getColumn(1).setMaxWidth(30);
		table_1.getColumnModel().getColumn(2).setResizable(false);
		table_1.getColumnModel().getColumn(2).setPreferredWidth(30);
		table_1.getColumnModel().getColumn(2).setMinWidth(30);
		table_1.getColumnModel().getColumn(2).setMaxWidth(30);
		table_1.getColumnModel().getColumn(3).setResizable(false);
		table_1.getColumnModel().getColumn(3).setPreferredWidth(50);
		table_1.getColumnModel().getColumn(3).setMinWidth(50);
		table_1.getColumnModel().getColumn(3).setMaxWidth(50);
		table_1.getColumnModel().getColumn(4).setResizable(false);
		table_1.getColumnModel().getColumn(4).setPreferredWidth(50);
		table_1.getColumnModel().getColumn(4).setMinWidth(50);
		table_1.getColumnModel().getColumn(4).setMaxWidth(50);
		table_1.getColumnModel().getColumn(5).setResizable(false);
		table_1.getColumnModel().getColumn(5).setPreferredWidth(50);
		table_1.getColumnModel().getColumn(5).setMinWidth(50);
		table_1.getColumnModel().getColumn(5).setMaxWidth(50);
		table_1.getColumnModel().getColumn(6).setResizable(false);
		table_1.getColumnModel().getColumn(6).setMinWidth(75);
		table_1.getColumnModel().getColumn(6).setMaxWidth(75);
		table_1.getColumnModel().getColumn(7).setResizable(false);
		table_1.getColumnModel().getColumn(7).setMinWidth(75);
		table_1.getColumnModel().getColumn(7).setMaxWidth(75);
		table_1.getColumnModel().getColumn(8).setResizable(false);
		table_1.getColumnModel().getColumn(8).setMinWidth(75);
		table_1.getColumnModel().getColumn(8).setMaxWidth(75);
		table_1.getColumnModel().getColumn(9).setResizable(false);
		table_1.getColumnModel().getColumn(9).setMinWidth(75);
		table_1.getColumnModel().getColumn(9).setMaxWidth(75);
		scrollPane.setViewportView(table_1);
		
		JPanel panel_2 = new JPanel();
		panel_2.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Medidas de Tend\u00EAncia Central", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));
		panel_2.setBounds(278, 339, 195, 127);
		panel_1.add(panel_2);
		panel_2.setLayout(null);
		
		JLabel lblMdiax = new JLabel("M\u00E9dia (x):");
		lblMdiax.setBounds(6, 21, 75, 14);
		panel_2.add(lblMdiax);
		
		JLabel lblModamo = new JLabel("Moda (Mo):");
		lblModamo.setBounds(6, 56, 75, 14);
		panel_2.add(lblModamo);
		
		JLabel lblMedianamd = new JLabel("Mediana(Md):");
		lblMedianamd.setBounds(6, 91, 75, 14);
		panel_2.add(lblMedianamd);
		
		JLabel label = new JLabel("New label");
		label.setBounds(91, 21, 46, 14);
		panel_2.add(label);
		
		JLabel lblNewLabel = new JLabel("New label");
		lblNewLabel.setBounds(91, 56, 46, 14);
		panel_2.add(lblNewLabel);
		
		JLabel lblNewLabel_1 = new JLabel("New label");
		lblNewLabel_1.setBounds(91, 91, 46, 14);
		panel_2.add(lblNewLabel_1);
		
		JPanel panel_3 = new JPanel();
		panel_3.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Medidas de Dispers\u00E3o", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));
		panel_3.setBounds(39, 339, 195, 127);
		panel_1.add(panel_3);
		panel_3.setLayout(null);
		
		JLabel lblDesvioMdioSimples = new JLabel("DMS:");
		lblDesvioMdioSimples.setBounds(6, 21, 82, 14);
		panel_3.add(lblDesvioMdioSimples);
		
		JLabel lblAt = new JLabel("At:");
		lblAt.setBounds(6, 56, 82, 14);
		panel_3.add(lblAt);
		
		JLabel lblDesvioPadro = new JLabel("Desvio Padr\u00E3o:");
		lblDesvioPadro.setBounds(6, 91, 82, 14);
		panel_3.add(lblDesvioPadro);
		
		JLabel label_1 = new JLabel("New label");
		label_1.setBounds(98, 91, 46, 14);
		panel_3.add(label_1);
		
		JLabel label_2 = new JLabel("New label");
		label_2.setBounds(98, 56, 46, 14);
		panel_3.add(label_2);
		
		JLabel label_3 = new JLabel("New label");
		label_3.setBounds(98, 21, 46, 14);
		panel_3.add(label_3);
		
		JPanel panel_4 = new JPanel();
		panel_4.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Medidas de Dispers\u00E3o", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));
		panel_4.setBounds(623, 18, 188, 203);
		panel_1.add(panel_4);
		panel_4.setLayout(null);
		
		JLabel lblQ = new JLabel("Q");
		lblQ.setBounds(10, 29, 19, 14);
		panel_4.add(lblQ);
		
		JSpinner spinner = new JSpinner();
		spinner.setBounds(27, 24, 29, 20);
		panel_4.add(spinner);
		spinner.setModel(new SpinnerNumberModel(0, 0, 4, 1));
		
		JSpinner spinner_1 = new JSpinner();
		spinner_1.setBounds(27, 68, 29, 20);
		panel_4.add(spinner_1);
		spinner_1.setModel(new SpinnerNumberModel(0, 0, 5, 1));
		
		JSpinner spinner_2 = new JSpinner();
		spinner_2.setBounds(27, 112, 29, 20);
		panel_4.add(spinner_2);
		spinner_2.setModel(new SpinnerNumberModel(0, 0, 10, 1));
		
		JSpinner spinner_3 = new JSpinner();
		spinner_3.setBounds(27, 156, 29, 20);
		panel_4.add(spinner_3);
		spinner_3.setModel(new SpinnerNumberModel(0, 0, 100, 1));
		
		JLabel lblK = new JLabel("K");
		lblK.setBounds(10, 72, 19, 14);
		panel_4.add(lblK);
		
		JLabel lblD = new JLabel("D");
		lblD.setBounds(10, 115, 19, 14);
		panel_4.add(lblD);
		
		JLabel lblP = new JLabel("P");
		lblP.setBounds(10, 158, 19, 14);
		panel_4.add(lblP);
		
		JLabel label_4 = new JLabel("=");
		label_4.setBounds(66, 29, 19, 14);
		panel_4.add(label_4);
		
		JLabel label_5 = new JLabel("=");
		label_5.setBounds(66, 71, 19, 14);
		panel_4.add(label_5);
		
		JLabel label_6 = new JLabel("=");
		label_6.setBounds(66, 115, 19, 14);
		panel_4.add(label_6);
		
		JLabel label_7 = new JLabel("=");
		label_7.setBounds(66, 159, 19, 14);
		panel_4.add(label_7);
		
		JLabel lblNewLabel_2 = new JLabel("New label");
		lblNewLabel_2.setBounds(95, 29, 46, 14);
		panel_4.add(lblNewLabel_2);
		
		JLabel lblNewLabel_3 = new JLabel("New label");
		lblNewLabel_3.setBounds(95, 71, 46, 14);
		panel_4.add(lblNewLabel_3);
		
		JLabel lblNewLabel_4 = new JLabel("New label");
		lblNewLabel_4.setBounds(95, 115, 46, 14);
		panel_4.add(lblNewLabel_4);
		
		JLabel lblNewLabel_5 = new JLabel("New label");
		lblNewLabel_5.setBounds(95, 159, 46, 14);
		panel_4.add(lblNewLabel_5);
		
		JMenuBar menuBar = new JMenuBar();
		frmCalcstatc.setJMenuBar(menuBar);
		
		JMenu mnArquivo = new JMenu("Arquivo");
		menuBar.add(mnArquivo);
		
		JMenu mnNovo = new JMenu("Novo");
		mnNovo.setIcon(new ImageIcon("C:\\Users\\aruan\\Downloads\\imagens java\\document6.png"));
		mnArquivo.add(mnNovo);
		
		JMenuItem mntmDadosDePesquisa = new JMenuItem("Dados de Pesquisa");
		mnNovo.add(mntmDadosDePesquisa);
		
		JMenuItem mntmAbrir = new JMenuItem("Abrir");
		mntmAbrir.setIcon(new ImageIcon("C:\\Users\\aruan\\Downloads\\imagens java\\empty11.png"));
		mnArquivo.add(mntmAbrir);
		
		JMenuItem mntmSalvar = new JMenuItem("Salvar");
		mntmSalvar.setIcon(new ImageIcon("C:\\Users\\aruan\\Downloads\\imagens java\\usb14.png"));
		mnArquivo.add(mntmSalvar);
		
		JMenuItem mntmSair = new JMenuItem("Sair");
		mntmSair.setIcon(new ImageIcon("C:\\Users\\aruan\\Downloads\\imagens java\\close18.png"));
		mnArquivo.add(mntmSair);
		
		JMenuItem mntmAruda = new JMenuItem("Ajuda");
		mntmAruda.setIcon(new ImageIcon("C:\\Users\\aruan\\Downloads\\imagens java\\question7.png"));
		menuBar.add(mntmAruda);
	}
}
